﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;

namespace FgoData.Core.Message.LeaderBoard
{
    public class LeaderBoard
    {
        [JsonProperty("title")]
        public string Title { get; set; }

        [JsonProperty("ranks")]
        public List<Rank> Ranks { get; set; }

        [JsonIgnore]
        public int GroupCount
        {
            get
            {
                int counter = 0;
                foreach (var rank in Ranks)
                {
                    counter += rank.Groups.Count;
                }
                return counter;
            }
        }
    }
}
